/*
 * Repository.h
 *
 *  Created on: Sep 5, 2011
 *      Author: Patrick
 */

#ifndef REPOSITORY_H_
#define REPOSITORY_H_

#include<GL/glew.h>
#include<SDL/SDL.h>
#include<SDL/SDL_image.h>
#include<SDL/SDL_ttf.h>
#include<string.h>
#include<map>

using namespace std;

#define MC_FONT_TTF_DEFAULT_NORMAL "__TTF_DEF_NORM"
#define MC_FONT_TTF_DEFAULT_BOLD "__TTF_DEF_BOLD"

#define MC_TEX_VIDEO "__VIDEO"

class LessFctr {
	public:
		bool operator ()(const char* s1, const char* s2) const {
			return strcmp(s1, s2) < 0;
		}
};

/*
 * Fonts
 */

typedef std::map<const char*, const char*, LessFctr> FontPathMap;
typedef std::map<const char*, TTF_Font*, LessFctr> FontMap;

TTF_Font* MCFontCreate(const char* name, const char* path, int size);
TTF_Font* MCFontLoad(const char* name);
int MCFontDestroy();

/*
 * Textures
 */

typedef std::map<const char*, const char*, LessFctr> TexturePathMap;
typedef std::map<const char*, GLuint, LessFctr> TextureIDMap;

GLuint MCTextureCreate(const char* name, const char* path);
GLuint MCTextureCreate(const char* name);
GLuint MCTextureLoad(const char* name);
int MCTextureDestroy();

#endif
